<?php
/**
 * This file is part of Notadd.
 *
 * @datetime 2017-11-20 16:19:16
 */

use Illuminate\Database\Schema\Blueprint;
use Notadd\Foundation\Database\Migrations\Migration;

/**
 * Class CreateExtSeckillProductsTable.
 */
class CreateExtSeckillProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $this->schema->create('ext_seckill_products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('商品名称');
            $table->string('pic')->comment('商品图片');
            $table->decimal('price_yuan')->comment('原始价格');
            $table->decimal('price_active')->comment('活动价格');
            $table->tinyInteger('recommend')->comment('首页推荐');
            $table->tinyInteger('mask')->comment('屏蔽商品');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        $this->schema->drop('ext_seckill_products');
    }
}
